﻿using System;

namespace FLMScan.Exception
{
    class ExceptionHelper
    {
        // these are all the exception we better keep unhandled
        public static bool IsUnhandledException(System.Exception ex)
        {
            if( ex is System.Exception)
                return true;
            if (ex is SystemException)
                return true;
            if (ex is StackOverflowException)
                return true;
            if (ex is OutOfMemoryException)
                return true;
            if (ex is NullReferenceException)
                return true;
            if (ex is IndexOutOfRangeException)
                return true;
            if (ex is AccessViolationException)
                return true;
            if (ex is InvalidOperationException)
                return true;
            if (ex is ArgumentException)
                return true;
            if (ex is ArgumentNullException)
                return true;
            if (ex is ArgumentOutOfRangeException)
                return true;
            
            return false;            
        }
    }
}
